package xcmg.device.dao.mapper.split;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.split.SplitDetailDO;
import xcmg.device.service.vo.split.SplitArrivalVO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Mapper
public interface SplitDetailMapper {
    int deleteByPrimaryKey(String id);

    int insert(SplitDetailDO record);

    SplitDetailDO selectByPrimaryKey(String id);

    int update(SplitDetailDO record);

    int deleteByMainId(@Param("mainId")String mainId);

    List<SplitDetailDO> list(@Param("mainId")String mainId);

    List<SplitDetailDO> listByMatType(@Param("splitOrder")String splitOrder, @Param("matType")Integer matType, @Param("orgId")String orgId);

    Map<String, BigDecimal> countSplitAmount(@Param("splitOrder")String splitOrder, @Param("matType")Integer matType, @Param("orgId")String orgId);

    int countSplitStatus(@Param("mainId")String mainId);

    SplitDetailDO selectByMaterialNo(@Param("mainId")String mainId, @Param("matType")Integer matType, @Param("materialsNo")String materialsNo);

    List<SplitArrivalVO> arrivalList(SplitArrivalVO condition);

    int arrivalListCount(SplitArrivalVO condition);
}